#3 编写一个程序，读取文件中保存的10个学生成绩名单信息(学号,姓名, Python课程分数); 然后按照分数从高到低进行排序输出

list1 = []
f = open('student.txt', 'r', encoding='utf-8')
for line in f:
    s = line.rsplit()
    list1.append(s)
f.close()
for i in range(0, len(list1)):
    for j in range(len(list1) - 1, i, -1):
        if int(list1[j][2]) > int(list1[j - 1][2]):
            t = list1[j - 1]
            list1[j - 1] = list1[j]
            list1[j] = t
print(list1)
